# -*- coding: utf-8 -*-
"""
Created on Tue Jun 24 14:33:06 2025

@author: ZRK
"""
import numpy as np

# 生成一个4行5列，范围为1~100的数组
data = np.random.randint(1, 100, (4, 5))

print("示例数据:")
print(data)

# 基本统计量
print("最大值:", np.max(data))
print("最小值:", np.min(data))
print("平均值:", np.mean(data))
print("中位数:", np.median(data))
print("标准差:", np.std(data))
print("方差:", np.var(data))
print("总和:", np.sum(data))

# 按轴统计
print("每列平均值:", np.mean(data, axis=0))
print("每行平均值:", np.mean(data, axis=1))
print("每列最大值:", np.max(data, axis=0))